package router

import (
	"api-gatwary/handler/api"
	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	user := r.Group("user")
	{
		user.POST("login", api.Login)
	}
	video := r.Group("video")
	{
		video.POST("videoadd", api.Videoadd)
		video.POST("videoUpdate", api.VideoUpdate)
		video.GET("videoList", api.VideoList)
	}
	upload := r.Group("upload")
	{
		upload.POST("upload", api.Upload)
	}
	return r
}
